package com.bci.pwtz.admin.service;

import com.bci.pwtz.common.util.PaginationList;
import com.bci.pwtz.exception.PwtzDatabaseException;
import com.bci.pwtz.mysql.model.AdminUser;

/**
 * 用户服务 <br/>
 * <p>Description:<br/>
 *    <p>TODO 详细描述
 *
 * <p>For Examples <br/>
 * <PRE>
 * </PRE>
 * <p>
 */
public interface AdminUserService
{

    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2015-1-12-下午3:55:34<br/>
     * <p>
     * @param userId
     * @return
     * @throws PwtzDatabaseException   
     * 
     */
    int delete(Long userId) throws PwtzDatabaseException;

    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2015-1-12-下午3:55:45<br/>
     * <p>
     * @param userId
     * @return
     * @throws PwtzDatabaseException   
     * 
     */
    AdminUser load(Long userId) throws PwtzDatabaseException;

    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2015-1-12-下午3:55:54<br/>
     * <p>
     * @param tel
     * @param userPwd
     * @return
     * @throws PwtzDatabaseException   
     * 
     */
    AdminUser findUserInfo(String tel, String userPwd) throws PwtzDatabaseException;

    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2015-1-12-下午3:56:01<br/>
     * <p>
     * @param user
     * @return
     * @throws PwtzDatabaseException   
     * 
     */
    int update(AdminUser user) throws PwtzDatabaseException;

    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2015-1-12-下午3:56:07<br/>
     * <p>
     * @param user
     * @return
     * @throws PwtzDatabaseException   
     * 
     */
    AdminUser add(AdminUser user) throws PwtzDatabaseException;

    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2015-1-12-下午3:56:13<br/>
     * <p>
     * @param userName
     * @return
     * @throws PwtzDatabaseException   
     * 
     */
    int selectCountByName(String userName) throws PwtzDatabaseException;

    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2015-1-12-下午3:56:19<br/>
     * <p>
     * @param mobile
     * @return
     * @throws PwtzDatabaseException   
     * 
     */
    int selectCountByMobile(String mobile) throws PwtzDatabaseException;

    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2015-1-12-下午3:56:23<br/>
     * <p>
     * @param adminUserId
     * @param pwd
     * @return
     * @throws PwtzDatabaseException   
     * 
     */
    int selectCountByPassword(Long adminUserId, String pwd) throws PwtzDatabaseException;

    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2015-1-12-下午3:56:29<br/>
     * <p>
     * @param pwd
     * @param mobile
     * @return
     * @throws PwtzDatabaseException   
     * 
     */
    int updatePwdByMobile(String pwd, String mobile) throws PwtzDatabaseException;
    
    public PaginationList<AdminUser> findUser(Long nowAdminUserId,int pageSize, int pageNo)throws PwtzDatabaseException;
    
    public int deleteById(String id) throws PwtzDatabaseException;
}
